home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
201-225
/
disk_221
/
iffm2
/
iffm2.doc
< prev
next >
Wrap
Text File
|
1992-05-06
|
10KB
|
218 lines
IIIIIIII FFFFFFFF FFFFFFFF MM MMM 222222
II FF FF MMMM MMMM 22 22
II FF FF MM MM MM MM 222
II FFFFFF FFFFFF MM MMMM MM 222
II FF FF MM MM MM 222
II FF FF MM MM 22
IIIIIIII FF FF MM MM 22222222
M2Amiga (tm) Modula-2 IFF Support Module
V1.0.0D for M2Amiga (tm) Rel 3.1
Copyright (c) 1988, 1989 Second Sight (tm)
Developed by Greg Epley
Introduction
~~~~~~~~~~~~
IFF files are organized in a basic manner and if this basic organization
doesn't exist the resulting file is not good for much of anything anyway.
It is with this principle in mind that we present IFF support for Interface
Technologies M2Amiga (tm) Modula-2 system.
This support bears little resemblance to Electronic Arts IFF-85 standard
routines for reading/writing IFF files, since this would greatly increase
the size of the support modules and also make them needlessly complicated
to use. The routines do follow the standards outlined in the IFF-85
standards published by Commodore-Amiga in cooperation with Electronic Arts,
and they will also take into account changes that occur as the standards are
refined.
To keep the system simple it will all be contained within a single support
module, which is NOT user expandable. The primary reason for this is so
that we can maintain control and order over the system. A user expandable
system would be nice but not very efficient in the long run since users
would be expanding it in different ways. The only way that we can maintain
that order is to keep the system source private so it CANNOT be altered.
The only exception to this might be the very knowledgable assembly language
"hacker" or some other unscrupulous individual who seeks to make life
unpleasant for everyone.
Please understand that we are not trying to monopolize IFF support for the
M2Amiga (tm) system by maintaining such control. The upgrade fee for future
enhancements to the module will be reasonable unless the system is pirated
by individuals such as those mentioned above; in that event we will probably
suspend any future releases but we will continue to support any problems
with the current release at that time. Let's hope it doesn't come to that.
The first priority is ILBM support, following with 8SVX, then SMUS and/or
ANIM (whichever seems to be needed first).
Demo
~~~~
The files you have with this document are for demonstration purposes only,
and provide ILBM (InterLeaved BitMap) file reading routines. If you like
what you see here we urge you to purchase the complete IFFM2 system modules
which currently offer reading and writing of ILBM files. See "Purchasing"
below for more information.
Installation
~~~~~~~~~~~~
1. You should have the following four files to use the system:
o IFFM2.sym
o IFFM2.obj
o IFFM2.def
o IFFM2.doc
In addition, you should also have the accessory files:
o ViewILBM
o ViewILBM.mod
2. We assume that programmers have a basic understanding of the CLI
since it is required from time to time. If you are not at all
familiar with the CLI you should seek out assistance from a
knowledgable friend or contact us for more specific information.
We also assume that most programmers have at least 2 3.5" floppy
drives. If you only have one it will take a few disk swaps to
install the files; again, we suggest you seek out the assistance
of a knowledgable friend or contact us for more information.
3. We suggest that you use the CLI to copy the IFFM2.sym file into
the Modules/Interfaces/sym directory, and the IFFM2.obj file
into the Modules/Interfaces/obj directory. You will find it
helpful to also print out the IFFM2.def file for reference to
the routines (this file has NOT been specifically formatted to
page-break; you will have to perform such operations yourself).
ILBM Support
~~~~~~~~~~~~
To read an ILBM file you need routines which can:
o Open and Close the file for access.
o Read the various groups of information (chunks) that the file has.
o Report errors that occur in text messages to a standard output
stream.
o When reading, parse the file for chunks regardless of order.
o A simple means of passing client declared storage areas to the
routines for accessing/filling.
BMHD, CMAP, BODY, and CAMG are the only supported ILBM chunks at this time.
Addition of CCRT and CRNG color-cycling chunks will come later. The
cmpByteRun1 decompression provided is at least as fast as the EA IFF-85
standard when used with any style of HAM (Hold-And-Modify) files, but is
anywhere from 1/3 to 1/2 slower when used with some other types of files,
particularly 16-color, hi-res, interlaced (640 x 400). Overscan files in
any resolutions are about as fast. We hope to eliminate this problem by
coding the compression/decompression algorithms in assembler at a later
date.
The IFFFileFrame Structure
~~~~~~~~~~~~~~~~~~~~~~~~~~
This structure provides areas for all items that currently require some
storage or reference. By updating this single structure and making a
few additions within the various routines we will be able to easily add
support for new file and chunk types as they appear. Here is the layout
of this sturcture:
filehandle - the DOS FileHandlePtr for the file to act upon.
bmhd - the BitMapHeaDer (BMHD) data space.
cmap - the ColorMAP (CMAP) data space.
bitmap - the BitMap (BODY) data space.
camg - the Commodore-AMiGa viewmodes data space.
In addition, the bmhd and cmap data spaces are structures which have still
more information relating to the data in the file. All of the parameters
in the supporting routines are totally independent of these, requiring only
the IFFFileFramePtr to the file you wish to act upon.
Routine Calls
~~~~~~~~~~~~~
You can find the specific Modula-2 format routine calls and other items of
interest in the IFFM2.def file. This is the DEFINITION module for IFFM2
support.
A sample program, ViewILBM, is included (along with the source), which shows
how to use the reading routines. It works from both the Workbench and CLI.
From the CLI prompt type:
1> viewilbm <file> [<delay>] <RETURN>
The <delay> parameter is optional. Omitting it will cause the picture to
stay until you close it. The <delay> is a number of seconds that you want
the picture to remain on-screen. <file> is the name of some picture file
that you want to see. If the picture file has an icon (or you provide an
icon) you can view the file from the Workbench. There are two ways to do
this:
1. Single-click on the picture file icon and select "Info"
from the "Workbench" menu. Click in the TOOL TYPES box
and type "viewilbm" (without the quotes), press <RETURN>,
and click on SAVE. Now you can view that picture by
just double-clicking on the picture icon.
2. Single-click on the ViewILBM icon, hold down either <SHIFT>
key, and double-click the picture icon.
Regardless of how you view the picture or if you use the <delay> option
from the CLI, you have control over when to stop viewing. Clicking anywhere
down in the displayed picture will cause a drag bar to appear to let you
move screens about or whatever. Clicking again anywhere down in the picture
will toggle that bar off. To end viewing at any time just click in the upper
left corner (where a window's close box would normally be). Also notice
that your mouse pointer appears when the drag bar appears and disappears at
all other times.
ViewILBM is not intended to be a fantastic work of programming art and some
changes have already taken place in the version which is included with the
full IFFM2 supports, though they are minor changes.
Purchasing
~~~~~~~~~~
To get the full IFFM2 supports, which will allow you to read and write ILBM
files, select ONE of the item #'s below and send the indicated items to the
address given below (PLEASE include a note with the item # on it for our
records or we can't process your order):
Item # Price
------------------------------------------------------
IFF001 Send check only. $30.00
IFF002 Send a check, blank disk, and SASM* $25.00
Make checks payable to: Greg Epley. NC residents please add appropriate
state tax. Incomplete orders will NOT be processed or returned (including
disks under option 2, unless a SASM is included under option 2, in which
case we will send your blank disk back without any files).
Send to: Second Sight
306 Arbor Drive
Lexington, NC 27292
Attn: Greg Epley
Please allow 3 weeks for delivery via US Mail. Foreign/Canadian orders
should expect an appropriate delay beyond this.
If you would like more information contact the developer via modem at:
MEGA-Byte
(704) 798-3431
1200/2400 baud, 8N1, 24 hrs/day
*SASM - Self-Addressed Stamped Mailer
---------------------------------------------------------------------------
Amiga is a registered trademark of Commodore-Amiga, Inc. Second Sight is a
trademark of Second Sight. M2Amiga is a trademark of Interface Technologies
and A.+L. Meier-Vogt.